﻿<!DOCTYPE HTML>
<html>
<head>
	<meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="keywords" content="">
    <meta name="description" content="">
    <meta name="format-detection"content="telephone=no,email=no"/>
	<title>107</title>
	<style>
	a{text-decoration:none;color:blue;}
	a:hover{color:red;}
		.page { text-align: center; width: 70%; overflow: hidden; float:left;}
		.page>strong, .page a { margin: 0 2px; height: 26px; line-height: 26px;  width: 28px; text-align: center; display: inline-block }
		.page>strong, .page a:hover { background:#1C9AD5; color: #FFF;border: #2E6AB1 1px solid; }
		.page a {border: #999 1px solid;text-decoration:none; }
		.select{padding-left:1%; width: 29%;float:left;text-align: left;}
	</style>
</head>
<body>
	<form name="form" method="post" onsubmit="return InputCheck(this)" action="<?php echo site_url("Backstage/del_enroll");?>">
			<table width="80%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D1DDAA" align="center" style="margin-top:8px;overflow:hidden;">
				<tr bgcolor="#E7E7E7">
					<td height="24" colspan="10" align="center" >&nbsp;报名信息&nbsp;</td>
				</tr>
				<tr align="center" bgcolor="#FAFAF1" height="22">
						<td width="5%">选择</td>
						<td width="10%">姓名</td>
						<td width="12%">年级</td>
						<td width="13%">专业</td>
						<td width="12%">手机号</td>
						<td width="15%">qq</td>
						<td width="20%">邮箱</td>
						<td width="18%">查看</td>
				</tr>
				<?php foreach($enroll as $value){?>
				<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="24" >
						<td><input type="checkbox" name="del[]" value="<?php echo $value->id;?>"/></td>
						<td><?php echo $value->name;?></td>
						<td><?php echo $value->grade;?></td>
						<td><?php echo $value->major;?></td>
						<td><?php echo $value->phone;?></td>
						<td><?php echo $value->qq;?></td>
						<td><?php echo $value->email;?></td>
						<td><a href="<?php echo site_url("Backstage/show_enroll/$value->id");?>">详情</a></td>
				</tr>
				<?php }?>
				
			
				<tr align="right" bgcolor="#EEF4EA" height="22">
						<td height="36" colspan="10">
							<div class="select"><a href="javascript:sall()">全选</a> 
								<a href="javascript:fall()">反选</a> 
								<!--<a href="javascript:nall()">全不选</a>-->&nbsp;&nbsp;&nbsp; 
								<input type="submit" name="submit" value="删除">&nbsp;&nbsp;&nbsp; 
							</div>
						</td>
				</tr>
			</table>
	</form>
	<script type="text/javascript">
			var cnames=document.getElementsByName("del[]");
			function sall(){
				for (var i=0;i<cnames.length;i++)
					cnames[i].checked="true";
			}
			function fall(){
				for (var i=0;i<cnames.length;i++)
					if(cnames[i].checked){
						cnames[i].checked="";}
					else{
						cnames[i].checked="true";}
			}
			function nall(){
				for (var i=0;i<cnames.length;i++)
					cnames[i].checked="";
			}
			
			function InputCheck(Form) 
			{ 
				var cnames=document.getElementsByName("del[]");
				var aaa=1
				for (var i=0;i<cnames.length;i++){
					if(cnames[i].checked){
						aaa=0;
						break;
					}
				}
				if(aaa){
					alert("请选择");
					return (false);
				}
				else{
					if (confirm('确定要删除吗？')) return true; else return false;
				}
				
			} 
		</script>
	</body>